<template>
    <div class="init-container"> <!-- <h1>初始化</h1> -->
        <div class="finish-title">
            <h2 style="text-align: center;">初始化基础信息（<span style="color: red;">以下信息仅能修改一次，谨慎操作！</span>）</h2>
            <el-steps :active="active" finish-status="success">
                <el-step title="开始"></el-step>
                <el-step title="步骤 1"></el-step>
                <el-step title="步骤 2"></el-step>
                <el-step title="步骤 3"></el-step>
                <el-step title="完成"></el-step>
            </el-steps>

        </div>
        <div class="init-main">
            <div v-show="active == 0">
                <h3>全宗信息</h3>
                <div style="    width: 100%;height:500px;display: flex;justify-content: center;align-items: center;">
                    <el-form style="width:400px;" :model="qzruleForm" :rules="qzrules" ref="qzruleForm" label-width="100px"
                        class="demo-ruleForm qzForm">
                        <el-form-item label="全宗名称" prop="fondsName">
                            <el-input v-model="qzruleForm.fondsName" style="width:100%;" placeholder="请输入全宗名称"></el-input>
                        </el-form-item>
                        <el-form-item label="全宗号" prop="fondsCode">
                            <el-input v-model="qzruleForm.fondsCode" placeholder="请输入全宗号"
                                onKeyUp="value=value.replace(/[\W]/g,'')" @blur="salaryChange"
                                style="width:100%;"></el-input>
                        </el-form-item>
                    </el-form>
                </div>
            </div>
            <div v-show="active == 1">
                <h3>单位信息</h3>
                <div class="app-container">
                    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
                        <el-form-item label="部门名称" prop="deptName">
                            <el-input v-model="queryParams.deptName" placeholder="请输入部门名称" clearable
                                @keyup.enter.native="handleQuery" />
                        </el-form-item>
                        <el-form-item label="状态" prop="status">
                            <el-select v-model="queryParams.status" placeholder="部门状态" clearable>
                                <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value"
                                    :label="dict.label" :value="dict.value" />
                            </el-select>
                        </el-form-item>
                        <el-form-item>
                            <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
                            <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
                        </el-form-item>
                    </el-form>

                    <el-row :gutter="10" class="mb8">
                        <el-col :span="1.5">
                            <el-button type="primary" plain icon="el-icon-plus" @click="handleAdd">新增</el-button>
                        </el-col>
                        <el-col :span="1.5">
                            <el-button type="info" plain icon="el-icon-sort" @click="toggleExpandAll">展开/折叠</el-button>
                        </el-col>

                        <el-col :span="1.5">
                            <el-button type="info" plain icon="el-icon-upload2" @click="handleImport">导入</el-button>
                        </el-col>
                        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
                    </el-row>

                    <el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId"
                        :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
                        height="450px">
                        <el-table-column prop="deptName" label="部门名称" width="350" header-align="center"></el-table-column>
                        <el-table-column prop="deptCode" label="部门编码" width="200" align="center"></el-table-column>
                        <el-table-column prop="status" label="状态" width="200" align="center">
                            <template slot-scope="scope">
                                <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
                            </template>
                        </el-table-column>
                        <el-table-column label="创建时间" align="center" prop="createTime" width="250">
                            <template slot-scope="scope">
                                <span>{{ parseTime(scope.row.createTime) }}</span>
                            </template>
                        </el-table-column>
                        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                            <template slot-scope="scope">
                                <!-- v-hasPermi="['system:dept:edit']" -->
                                <el-button type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
                                <!-- v-hasPermi="['system:dept:add']" -->
                                <el-button type="text" icon="el-icon-plus" @click="handleAdd(scope.row)"
                                    v-hasPermi="['system:dept:add']">新增</el-button>
                                <!--  v-hasPermi="['system:dept:remove']" -->
                                <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
                            </template>
                        </el-table-column>
                    </el-table>

                    <!-- 添加或修改部门对话框 -->
                    <el-dialog :title="title" :visible.sync="open" width="660px" append-to-body>
                        <el-form ref="form" :model="form" :rules="rules" label-width="110px">
                            <el-row>
                                <el-col :span="24" v-if="form.parentId != 0">
                                    <el-form-item label="上级部门" prop="parentId">
                                        <treeselect v-model="form.parentId" :options="deptOptions" empty-text="根节点"
                                            :normalizer="normalizer" placeholder="选择上级部门" noResultsText="暂无数据"
                                            noOptionsText="暂无数据" />
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col :span="12">
                                    <el-form-item label="部门名称" prop="deptName">
                                        <el-input v-model="form.deptName" placeholder="请输入部门名称" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="12">
                                    <el-form-item label="显示排序" prop="orderNum">
                                        <el-input-number v-model="form.orderNum" controls-position="right" :min="0"
                                            :max="9999" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="12">
                                    <el-form-item label="部门编码" prop="deptCode">
                                        <el-input v-model="form.deptCode" placeholder="请输入部门编码" maxlength="50" />
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col :span="12">
                                    <el-form-item label="负责人角色" prop="leader">
                                        <!--<el-input v-model="form.leader" placeholder="请选择角色" maxlength="25" />-->
                                        <el-select v-model="form.leader" filterable placeholder="请选择角色">
                                            <el-option v-for="item in roleListSelect" :key="item.value" :label="item.label"
                                                :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="12">
                                    <el-form-item label="兼职档案管理员" prop="daglyRoleKey">
                                        <!--<el-input v-model="form.daglyRoleKey" placeholder="请选择角色" maxlength="25" />-->
                                        <el-select v-model="form.daglyRoleKey" filterable placeholder="请选择角色">
                                            <el-option v-for="item in roleListSelect" :key="item.value" :label="item.label"
                                                :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="12">
                                    <el-form-item label="生产院领导" prop="produceLeader">
                                        <el-select v-model="form.produceLeader" filterable placeholder="请选择角色">
                                            <el-option v-for="item in roleListSelect" :key="item.value" :label="item.label"
                                                :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col :span="12">
                                    <el-form-item label="联系电话" prop="phone">
                                        <el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="15" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="12">
                                    <el-form-item label="邮箱" prop="email">
                                        <el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col :span="12">
                                    <el-form-item label="部门状态">
                                        <el-radio-group v-model="form.status">
                                            <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value"
                                                :label="dict.value">{{ dict.label }}</el-radio>
                                        </el-radio-group>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-form>
                        <div slot="footer" class="dialog-footer">
                            <el-button type="primary" @click="submitForm">确 定</el-button>
                            <el-button @click="cancel">取 消</el-button>
                        </div>
                    </el-dialog>
                    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
                        <el-upload ref="upload" accept=".xlsx, .xls" :headers="upload.headers" :on-change="handleFileChange"
                            :file-list="fileList" :action="upload.url" :disabled="upload.isUploading"
                            :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false"
                            drag>
                            <i class="el-icon-upload"></i>
                            <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                            <div class="el-upload__tip text-center" slot="tip">
                                <!--          <div class="el-upload__tip" slot="tip">-->
                                <!--            <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的基础数据-->
                                <!--          </div>-->
                                <span>仅允许导入xls、xlsx格式文件。</span>
                                <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
                                    @click="importTemplate">下载模板</el-link>
                            </div>
                        </el-upload>
                        <div slot="footer" class="dialog-footer">
                            <el-button type="primary" @click="submitFileForm">确 定</el-button>
                            <el-button @click="upload.open = false">取 消</el-button>
                        </div>
                    </el-dialog>

                </div>
            </div>
            <div v-show="active == 2">
                <h3>档案管理</h3>
                <el-form :model="daglruleForm" :rules="daglrules" ref="daglruleForm" label-width="100px"
                    class="demo-ruleForm">
                    <el-divider content-position="left">档案管理员</el-divider>
                    <div>
                        <el-row>
                          <el-col :span="12">
                            <el-form-item label="部门" prop="deptId1">
                                <treeselect v-model="daglruleForm.deptId1" :options="deptOptions" label placeholder="请选择部门"  :normalizer="normalizer1"/>
                                </el-form-item>
                           
                          </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="用户名" prop="username1">
                                    <el-input v-model="daglruleForm.username1" style="width:100%;"
                                        placeholder="请输入用户名称"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="密码" prop="password1">
                                    <el-input placeholder="请输入密码" v-model="daglruleForm.password1" show-password></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="确认密码" prop="password1New">
                                    <el-input placeholder="请输入确认密码" v-model="daglruleForm.password1New"
                                        show-password></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </div>
                    <el-divider content-position="left">兼职档案管理员</el-divider>
                    <div>
                        <el-row>
                          <el-col :span="12">
                            <el-form-item label="部门" prop="deptId2">
                                <treeselect v-model="daglruleForm.deptId2" :options="deptOptions" label placeholder="请选择部门"  :normalizer="normalizer1"/>
                                </el-form-item>
                           
                          </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="用户名" prop="username2">
                                    <el-input v-model="daglruleForm.username2" style="width:100%;"
                                        placeholder="请输入用户名称"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="密码" prop="password2">
                                    <el-input placeholder="请输入密码" v-model="daglruleForm.password2" show-password></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="确认密码" prop="password2New">
                                    <el-input placeholder="请输入确认密码" v-model="daglruleForm.password2New"
                                        show-password></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </div>
                </el-form>
            </div>
            <div v-show="active == 3">
                <h3>普通用户</h3>
                <div class="app-container main-iscrll">
                    <userSystem v-if="active == 3" :cshType="true" ref="childTable"></userSystem>
                </div>
            </div>
            <div v-show="active == 4">

                <div
                    style=" width: 100%;height:700px;display: flex;justify-content: center;align-items: center;flex-direction: column;">
                    <div style="    font-size: 110px;
    padding: 30px;color:#13ce66" class="el-icon-check"></div>
                    <el-button type="success" @click="onCSHSessuTap">初始化已完成</el-button>
                </div>
            </div>
            <el-button type="primary"
                style="position: absolute;transform: translate(-50%, -50%);    bottom: 10px;left: 50%;" @click="next"
                v-if="active <= 3">下一步</el-button>
        </div>
    </div>
</template>
<script>
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import { deptTreeSelect } from "@/api/system/user";
import { listRole } from "@/api/system/role";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from "@/utils/auth";
import { initFonds, adduserinit, endInit } from "@/api/initialization1.js"
import userSystem from "@/views/system/user/userIndex.vue"
export default {
    dicts: ['sys_normal_disable'],
    components: { Treeselect, userSystem },
    data() {
        var validatePass = (rule, value, callback) => {
            if (value === '') {
                callback(new Error('请输入密码'));
            } else {
                if (this.daglruleForm.password1New !== '') {
                    this.$refs.daglruleForm.validateField('password1New');
                }
                callback();
            }
        };
        var validatePass2 = (rule, value, callback) => {

            if (value === '') {
                callback(new Error('请再次输入密码'));
            } else if (value !== this.daglruleForm.password1) {
                callback(new Error('两次输入密码不一致!'));
            } else {
                callback();
            }
        };
        var validatePassNew = (rule, value, callback) => {
            if (value === '') {
                callback(new Error('请输入密码'));
            } else {
                if (this.daglruleForm.password2New !== '') {
                    this.$refs.daglruleForm.validateField('password2New');
                }
                callback();
            }
        };
        var validatePassNew2 = (rule, value, callback) => {

            if (value === '') {
                callback(new Error('请再次输入密码'));
            } else if (value !== this.daglruleForm.password2) {
                callback(new Error('两次输入密码不一致!'));
            } else {
                callback();
            }
        };
        return {
            active: 0,
            qzruleForm: { //全宗信息
                fondsCode: undefined,
                fondsName: undefined
            },
            qzrules: {
                fondsCode: [
                    { required: true, message: "请输入全宗号", trigger: "blur" },
                ],
                fondsName: [
                    { required: true, message: "请输入全宗名称", trigger: "blur" }
                ],
            },

            fileList: [],

            // 遮罩层
            loading: true,
            // 显示搜索条件
            showSearch: true,
            // 表格树数据
            deptList: [],
            // 部门树选项
            deptOptions: [],
            // 弹出层标题
            title: "",
            // 是否显示弹出层
            open: false,
            // 是否展开，默认全部展开
            isExpandAll: true,
            // 重新渲染表格状态
            refreshTable: true,

            roleListSelect: [],
            // 查询参数
            queryParams: {
                deptName: undefined,
                status: undefined
            },
            queryParamsNoPage: {
                pageNum: 1,
                pageSize: 2147483647,
                status: 0
            },
            // 表单参数
            form: {},
            // 表单校验
            rules: {
                parentId: [
                    { required: true, message: "上级部门不能为空", trigger: "blur" }
                ],
                deptName: [
                    { required: true, message: "部门名称不能为空", trigger: "blur" }
                ],
                orderNum: [
                    { required: true, message: "显示排序不能为空", trigger: "blur" }
                ],
                deptCode: [
                    { required: true, message: "部门编码不能为空", trigger: "blur" }
                ],
                email: [
                    {
                        type: "email",
                        message: "请输入正确的邮箱地址",
                        trigger: ["blur", "change"]
                    }
                ],
                phone: [
                    {
                        pattern: /^(?:(?:\+|00)(\d{1,3})[\s-]?)?(?:\(?\d{2,6}\)?[\\s-]?)?\d{3,12}$/,
                        message: "请输入正确的手机号码",
                        trigger: "blur"
                    }
                ]
            },
            // 用户导入参数
            upload: {
                // 是否显示弹出层（用户导入）
                open: false,
                // 弹出层标题（用户导入）
                title: "",
                // 是否禁用上传
                isUploading: false,
                // 是否更新已经存在的基础数据
                updateSupport: 0,
                // 设置上传的请求头部
                headers: { Authorization: "Bearer " + getToken() },
                // 上传的地址
                url: process.env.VUE_APP_BASE_API + "/system/dept/import"
            },

            //**************************************档案管理参数************************************** */
            daglruleForm: {
                username1: undefined,
                password1: undefined,
                password1New: undefined,
                deptId1:undefined,
                username2: undefined,
                password2: undefined,
                password2New: undefined,
                deptId2:undefined
            },
            daglrules: {
                username1: [
                    { required: true, message: "请输入用户名称", trigger: "blur" },
                ],
                password1: [

                    { required: true, message: '请输入密码', trigger: 'blur' },
                    { validator: validatePass, trigger: 'blur' }
                ],
                password1New: [
                    { required: true, message: "请输入确认密码", trigger: "blur" },
                    { required: true, validator: validatePass2, trigger: 'blur' }
                ],
                deptId1:[{ required: true, message: "请选择部门", trigger: "" }],
                username2: [
                    { required: true, message: "请输入用户名称", trigger: "blur" },
                ],
                password2: [
                    { required: true, message: "请输入密码", trigger: "blur" },
                    { validator: validatePassNew, trigger: 'blur' }
                ],
                password2New: [
                    { required: true, message: "请输入确认密码", trigger: "blur" },
                    { required: true, validator: validatePassNew2, trigger: 'blur' }
                ],
                deptId2:[{ required: true, message: "请选择部门", trigger: "blur" }],
            },

            deptOptions:[]
        }
    },
    beforeDestroy() {
      
    },

    created() {
        
    },
    methods: {

                 // 只能选择数据下面有children 的数据，没有children的时候禁用
     normalizer1(node) {
            if (node.children == null || node.children == undefined || !node.children.length) {
                delete node.children;
            }
            return node
        },

               /** 查询部门下拉树结构 */
         getDeptTree() {
            deptTreeSelect().then(response => {
                this.deptOptions = response.data;
            });
        },
  //解决vue+element— el-input 限制只能输入数字时和字母时与表单验证rules冲突问题
        salaryChange(e) {
            this.qzruleForm.fondsCode = e.target.value;
        },
        next() {
            var that = this;
            if (this.active == 0) {//全宗信息
                console.log("全宗信息")
                this.$refs.qzruleForm.validate((valid) => {
                    if (valid) {
                        initFonds(this.qzruleForm).then(res => {
                            if (res.code == "200") {
                                this.getList();
                                this.getRoleListSelect();
                                if (this.active++ > 4) this.active = 0;
                            } else {
                                this.$modal.msgError(res.msg)
                            }
                        })

                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });
            } else if (this.active == 1) { //单位信息
                console.log("单位信息")
                if (that.deptList.length > 0) {

                    that.getDeptTree();
                    if (this.active++ > 4) this.active = 0;

                } else {
                    this.$modal.msgWarning("请添加部门单位")
                }

            } else if (this.active == 2) { //档案管理
                this.$refs.daglruleForm.validate((valid) => {
                    if (valid) {

                        adduserinit(this.daglruleForm).then(res => {
                            console.log(res)
                            if (res.code == "200") {
                                if (this.active++ > 4) this.active = 0;
                            } else {
                                this.$modal.msgError(res.msg)
                            }
                        })


                    } else {

                        console.log('error submit!!');
                        return false;
                    }
                });
            } else if (this.active == 3) { //普通用户
                const childInstance = this.$refs.childTable;

                const childData = childInstance.userList;

                if (childData.length > 0) {
                    if (this.active++ > 4) this.active = 0;
                } else {
                    this.$modal.msgWarning("请添加用户信息")
                }
            }
        },

        onCSHSessuTap() {
            endInit().then(res => {
                if (this.active++ > 4) this.active = 0;
                setTimeout(() => {
                    this.$router.push({ path: this.redirect || "/" }).catch(() => { });
                }, 500);
            })
        },
        /** 查询部门列表 */
        getList() {
            this.loading = true;
            listDept(this.queryParams).then(response => {
                this.deptList = this.handleTree(response.data, "deptId");
                this.loading = false;
            });
        },
        getRoleListSelect() {
            listRole(this.queryParamsNoPage).then(resp => {
                console.log(resp.rows)
                for (const key in resp.rows) {
                    const item = resp.rows[key];
                    this.roleListSelect.push({ "label": item.roleName, "value": item.roleKey });
                }
            });
        },
        /** 转换部门数据结构 */
        normalizer(node) {
            if (node.children && !node.children.length) {
                delete node.children;
            }
            return {
                id: node.deptId,
                label: node.deptName,
                children: node.children
            };
        },
        // 取消按钮
        cancel() {
            this.open = false;
            this.reset();
        },
        // 表单重置
        reset() {
            this.form = {
                deptId: undefined,
                parentId: undefined,
                deptName: undefined,
                orderNum: undefined,
                leader: undefined,
                daglyRoleKey: undefined,
                produceLeader: undefined,
                phone: undefined,
                deptCode: undefined,
                email: undefined,
                status: "0"
            };
            this.resetForm("form");
        },
        /** 搜索按钮操作 */
        handleQuery() {
            this.getList();
        },
        /** 重置按钮操作 */
        resetQuery() {
            this.resetForm("queryForm");
            this.handleQuery();
        },
        /** 新增按钮操作 */
        handleAdd(row) {
            this.reset();
            if (row != undefined) {
                this.form.parentId = row.deptId;
            }
            this.open = true;
            this.title = "添加部门";
            listDept().then(response => {
                this.deptOptions = this.handleTree(response.data, "deptId");
            });
        },
        /** 展开/折叠操作 */
        toggleExpandAll() {
            this.refreshTable = false;
            this.isExpandAll = !this.isExpandAll;
            this.$nextTick(() => {
                this.refreshTable = true;
            });
        },
        /** 修改按钮操作 */
        handleUpdate(row) {
            this.reset();
            getDept(row.deptId).then(response => {
                this.form = response.data;
                this.open = true;
                this.title = "修改部门";
            });
            listDeptExcludeChild(row.deptId).then(response => {
                this.deptOptions = this.handleTree(response.data, "deptId");
            });
        },
        /** 提交按钮 */
        submitForm: function () {
            this.$refs["form"].validate(valid => {
                if (valid) {
                    if (this.form.deptId != undefined) {
                        updateDept(this.form).then(response => {
                            this.$modal.msgSuccess("修改成功");
                            this.open = false;
                            this.getList();
                        });
                    } else {
                        addDept(this.form).then(response => {
                            this.$modal.msgSuccess("新增成功");
                            this.open = false;
                            this.getList();
                        });
                    }
                }
            });
        },
        /** 删除按钮操作 */
        handleDelete(row) {
            this.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项？').then(function () {
                return delDept(row.deptId);
            }).then(() => {
                this.getList();
                this.$modal.msgSuccess("删除成功");
            }).catch(() => { });
        },

        /**导入按钮操作 */
        handleImport() {
            this.upload.title = "部门导入";
            this.upload.open = true;
        }, // 提交上传文件
        submitFileForm() {
            this.$refs.upload.submit();
        },
        // 文件上传中处理
        handleFileUploadProgress(event, file, fileList) {
            this.upload.isUploading = true;
        },
        handleFileChange(file, fileList) {
            this.fileList = []
            let length = fileList.length
            this.fileList = [fileList[length - 1]]
        },
        // 文件上传成功处理
        handleFileSuccess(response, file, fileList) {
            this.upload.open = false;
            this.upload.isUploading = false;
            this.$refs.upload.clearFiles();
            var mm = response.msg.replace(/;/g, "</br>");
            this.$alert(mm, "导入结果", { dangerouslyUseHTMLString: true, confirmButtonText: '确定' });
            this.getList();
        },
        /** 下载模板操作 */
        importTemplate() {
            this.download('/system/dept/importmodel', {
            }, `basicdata_template_${new Date().getTime()}.xlsx`)
        }

    }
}
</script>
<style lang="scss" scoped>
::v-deep .row-expand-cover td .el-table__expand-icon {
    visibility: hidden;
}

.init-container {
    padding-top: 20px;

    .finish-title {
        width: 50%;
        margin: 0px auto 30px;
    }

    .init-main {
        width: 70%;
        box-shadow: 0px 2px 15px 6px rgb(237, 236, 236);
        border-radius: 20px;
        margin: 0 auto;
        padding: 20px;
        height: 730px;
        overflow-y: hidden;
        position: relative;
    }

    .main-iscrll {
        height: 600px;
        width: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }
}
</style>